package com.bawei.lizhiyu1228.ui.adapter;

import android.widget.ImageView;

import com.bawei.lizhiyu1228.R;
import com.bawei.lizhiyu1228.foot.Foot;
import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;

/**
 * @author : zhiyu
 * @date : 2021/12/28
 * @content :
 */
public class FootAdapter extends BaseQuickAdapter<Foot.DataBean, BaseViewHolder> {

    public FootAdapter( @Nullable List<Foot.DataBean> data) {
        super(R.layout.item_foot, data);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, Foot.DataBean dataBean) {
        Glide.with(getContext()).load(dataBean.getPic()).override(200,200).into((ImageView) baseViewHolder.getView(R.id.foot_im));
        baseViewHolder.setText(R.id.foot_tv, dataBean.getFood_str());
    }
}
